<?php

class IndexController extends lfController
{

	function Index()
	{
		$this->view->SetLayout('index');
		//		$this->view->SetTemplate('index');
		$this->view->title = "由控制器设置的标题";
		$this->view->data1 = "向模板传递的数据";
		$this->view->value = "向片段传递的数据";
		$this->view->AddScripts(array(
			"jquery", "mootools"
		));
		$this->view->AddStyles(array(
			"xx", "common"
		));
		
		//$data = InfoCatalogDao()->PAGE_SIZE(30)->Get(1, 1);
		
		//echo "<pre>";
		//echo "record count: " . $data->RECORD_COUNT() . "<br />";
		//echo "visibel count:" . $data->VISIBEL_COUNT() . "<br />";
		//echo "page count:" . $data->PAGE_COUNT() . "<br />";
		
		//		$data->PrintTable(400);
		//echo "</pre>";
	}

	function AddCustomer()
	{
		//		$this->view->title = "由控制器设置的标题";
		//		$this->view->data1 = "向模板传递的数据";
		//		$this->view->value = "向片段传递的数据";
		//		$this->view->SetLayout('index');
		//		$this->view->SetTemplate('Index');
		//		$this->view['value'] = $name;
		//		echo "POST value xx2 = :" ,$this->xx2;
		//		
		//		var_dump($this->IS_GET());
		

		//		$s = '
		//			function x(){
		//			$("#images").html("abcd html");
		//			alert(12333334);
		//			}
		//			x();
		//		';
		//		$js = array('a'=>$s,'b'=>'b122','c'=>'c','d'=>'d');
		////		echo json_encode($js);
		//
		//		$x = new xx();
		//		
		//		echo json_encode($js);
		
		
		if ($this->xx2 == "lplus@126.com")
		{
			$this->view->HtmlElement("#images")->Html("您的email已经存在");
			$this->view->HtmlElement("#name1")->Val("重填,谢谢");
		}
		else 
		{
			$this->view->HtmlElement("#images")->Html("您的email不存在，可以注册");
		}
	}
}
?>
